module.exports = function(DataTypes) {
  return {
    attributes: {
      rating: {
        type: DataTypes.INTEGER,
        comment: '0-100 rating, 100 is correct/5stars, 0 is incorrect/0stars'
      },
      likeCount: {
        type: DataTypes.INTEGER,
        defaultValue: 0,
        comment: 'The number of users who liked this'
      },
      dislikeCount: {
        type: DataTypes.INTEGER,
        defaultValue: 0,
        comment: 'The number of users who disliked this'
      }
    },
    options: {
      indexes: [
        {
          name: 'rating_idx',
          fields: ['rating']
        },
        {
          name: 'like_count_idx',
          fields: ['likeCount']
        }
      ]
    }
  }
}
